@{
    Layout=null;
}

@model MvcDome01.Models.Student

<table>
    @if(Model==null)
    {
        <tr>
            <td>姓名:<input type="text" name=name></td>
        </tr>
        <tr>
            <td>备注:<input type="text" name=remarks></td>
        </tr>
        <tr>
            <td>学校：
                <select name="schoolId">
                    <option value="1">1中</option>
                    <option value="2">2中</option>
                    <option value="3">3中</option>
                </select>
            </td>
        </tr>
    }else
    {
        <tr hidden>
            <td>Id：<input type="text" name=id value="@Model.Id"></td>
        </tr>
        <tr>
            <td>姓名:<input type="text" name=name value="@Model.StuName"></td>
        </tr>
        <tr>
            <td>备注:<input type="text" name=remarks value="@Model.Remarks"></td>
        </tr>
        <tr>
            <td>学校：
                <select name="schoolId">
                    <option value="1">1中</option>
                    <option value="2">2中</option>
                    <option value="3">3中</option>
                </select>
            </td>
        </tr>
    }
    <tr>
        <td>
            <button onclick="btnsave()">保存</button>
            <button onclick="btnback()">返回</button>
        </td>
    </tr>
</table>

<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="~/js/base.js"></script>